From: Wei Liu Date: Wed, 26 Apr 2017 15:24:13 +0000 (+0100) Subject: x86/pv/domain: clean up setup_compat_l4 X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2069 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=b3507d1b5b366cf11d4b3d29db78a3bfbadb1cda;p=xen.git x86/pv/domain: clean up setup_compat_l4 Move updating type_info after clearing the page. Add spaces. Suggested-by: Andrew Cooper Signed-off-by: Wei Liu Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/pv/domain.c b/xen/arch/x86/pv/domain.c index 2fa075bc43..4bd65819f7 100644 --- a/xen/arch/x86/pv/domain.c +++ b/xen/arch/x86/pv/domain.c @@ -27,14 +27,14 @@ static int setup_compat_l4(struct vcpu *v) if ( pg == NULL ) return -ENOMEM; - /* This page needs to look like a pagetable so that it can be shadowed */ - pg->u.inuse.type_info = PGT_l4_page_table|PGT_validated|1; - l4tab = __map_domain_page(pg); clear_page(l4tab); init_guest_l4_table(l4tab, v->domain, 1); unmap_domain_page(l4tab); + /* This page needs to look like a pagetable so that it can be shadowed */ + pg->u.inuse.type_info = PGT_l4_page_table | PGT_validated | 1; + v->arch.guest_table = pagetable_from_page(pg); v->arch.guest_table_user = v->arch.guest_table;